/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package base.node;

import java.awt.Point;
import java.io.Serializable;

/**
 * Class encapsulating id, energy & position of a node
 * @author artem, Arvanitis Ioannis
 */
public class NodeInfo implements Serializable {

    private int id;    
    private double energy;
    private Point position;
    private int daemonInterval;
    private float antennaRadPow;
    private float antennaThres;

    /**
     * Class representing the crucial node's information over itself
     * @param id The node's id
     * @param energy The node's energy
     * @param position The node's position
     * @param daemonInterval The interval for internal operations
     * @param antennaRadPow Antenna's radiated power
     * @param antennaThres Antenna's threshold for reception
     */
    public NodeInfo(int id, double energy, Point position, int daemonInterval, float antennaRadPow, float antennaThres) {
        setId(id);
        setEnergy(energy);
        setPosition(position);
        setDaemonInterval(daemonInterval);
        setAntennaThres(antennaThres);
    }

    /**
     * Gets the node's id
     * @return the id
     */
    public int getId() {
        return id;
    }

    /**
     * Sets the node's id
     * @param id The id to set
     */
    private void setId(int id) {
        this.id = id;
    }

    /**
     * Gets the current energy
     * @return the energy
     */
    public double getEnergy() {
        return energy;
    }

    /**
     * Sets the current energy
     * @param energy The energy to set
     */
    public void setEnergy(double energy) {
        this.energy = energy;
    }

    /**
     * Gets the current position
     * @return the position
     */
    public Point getPosition() {
        return position;
    }

    /**
     * Sets the current position
     * @param position The position to set
     */
    public void setPosition(Point position) {
        this.position = position;
    }

    /**
     * Gets the antenna's radiated power
     * @return the antenna's radiated power
     */
    public float getAntennaRadPow() {
        return antennaRadPow;
    }

    /**
     * Sets the antenna's radiated power
     * @param antennaRadPow The antenna's radiated power
     */
    public void setAntennaRadPow(float antennaRadPow) {
        this.antennaRadPow = antennaRadPow;
    }

    /**
     * Gets the antenna's threshold for reception
     * @return the antenna's threshold for reception
     */
    public float getAntennaThres() {
        return antennaThres;
    }

    /**
     * Sets the antenna's threshold for reception
     * @param antennaThres The antenna's threshold for reception
     */
    public void setAntennaThres(float antennaThres) {
        this.antennaThres = antennaThres;
    }

    /**
     * Gets the time interval for internal operations
     * @return the time interval for internal operations
     */
    public int getDaemonInterval() {
        return daemonInterval;
    }

    /**
     * Sets the time interval for internal operations
     * @param daemonInterval The time interval for internal operations
     */
    public void setDaemonInterval(int daemonInterval) {
        this.daemonInterval = daemonInterval;
    }

}
